package com.xx.xiawan.videoplayer;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class Utils {
    public final static String MATERIAL_ID_KEY = "materialId";
    public final static String MATERIAL_URL_KEY = "materialUrl";
    public final static String USER_NAME_KEY = "userName";
    public final static String NAME_KEY = "name";
    public final static String MATERIAL_NAME_KEY = "materialName";
    public final static String MATERIAL_VIDEO_DATA_KEY = "arMaterialVideoData";
    public static boolean isNetworkAvailable(Context context) {
        ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
        NetworkInfo netInfo = cm.getActiveNetworkInfo();
        return netInfo != null && netInfo.isConnectedOrConnecting();
    }

    /**
     * Is the live streaming still available
     * @return is the live streaming is available
     */
    public static boolean isLiveStreamingAvailable() {
        // Todo: Please ask your app server, is the live streaming still available
        return true;
    }
}
